// pages/notify/index.ts
Page({
  data: {
    notifyDetail: null,
  },
  onLoad(options) {
    console.log(options)
    this.getNotifyDetail(options.id)
  },

  getNotifyDetail(id) {
    console.log(id)
    wx.request({
      url: `https://live-api.itheima.net/announcement/${id}`,
      method: 'GET',
      success: (res) => {
        console.log('公告详情res', res)
        // 设置页面数据
        this.setData({
          notifyDetail: res.data.data
        })
      }
    })
  }

})